package com.dudu.service.support;

import java.util.List;
import java.util.Map;

import com.dudu.bean.IfControlBean;
import com.dudu.bean.IfControlRuleBean;
import com.dudu.enumeration.AbilityTypeEnum;

/**
 * 信控核心处理类工厂类
 * @author zx
 *
 */
public class InfoControlProcessorCreator {
    
	/**
	 * 生成信控核心处理对象
	 * @param ifcBean
	 * @param ifcRules
	 * @param parameterMap
	 * @return
	 */
	public static IInfoControlProcessor getProcessor(IfControlBean ifcBean, List<IfControlRuleBean> ifcRules,
			Map<String, String> parameterMap) {
		String productCode = ifcBean.getProductCode();
		if (AbilityTypeEnum.VOICE.getKey().equals(productCode)
				|| AbilityTypeEnum.AUDEO.getKey().equals(productCode)) {
			return new VoiceInfoControlProcessor(ifcBean, ifcRules, parameterMap);
		}
		return null;
	}

}
